package cn.luyou.admin.mapper;

import cn.luyou.admin.entity.ExamRecordDetail;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ExamRecordDetailMapper extends BaseMapper<ExamRecordDetail> {
    @Select("SELECT d.* FROM exam_record_detail d " +
           "JOIN exam_record r ON d.record_id = r.id " +
           "WHERE r.user_id = #{userId} AND d.is_correct = false")
    List<ExamRecordDetail> selectWrongQuestions(Long userId);
} 